<div class="set-config">
  <!--确认弹窗-->
  <p-confirmDialog acceptLabel="确认" rejectLabel="取消"></p-confirmDialog>
  <!--消息提示-->
  <p-messages  [closable]="true" [style]="{'position':'fixed','left':'10vw','top': '0','margin-top': '0','width': '100vw','z-index':'9999'}"></p-messages>
  <!--顶部按钮-->
  <div class="set-config-header">
    <div class=" ui-g-4">
      <div class="ui-g-1 set-config-header-btn set-config-header-btn-add" (click)="configAddClick()">
        <img class="set-config-header-img-add" src="assets/images/ic_add.png" alt="">
        <span>增 加</span>
      </div>
      <div class="ui-g-1 set-config-header-btn set-config-header-btn-modify" (click)="configModifyClick()">
        <img class="set-config-header-img-modify" src="assets/images/ic_modify.png" alt="">
        <span>修 改</span>
      </div>
      <div class="ui-g-1 set-config-header-btn set-config-header-btn-delete" (click)="configDeleteClick()">
        <img class="set-config-header-img-delete" src="assets/images/ic_delete.png" alt="">
        <span>删 除</span>
      </div>
    </div>
    <!--搜索-->
    <div class="ui-inputgroup set-config-header-btn-search">
      <input type="text" pInputText placeholder="请输入地块号" #input>
      <button   type="button"  (click)="configSearchClick()"  label="搜索" style="outline: none;border:0;background: #5E6372;width: 6vw;color: #fff;margin-left: 1vw;border-radius: 5px">搜索</button>
      <!--<span class="ui-inputgroup-addon" (click)="exportSearchClick($event)"><i class="fa fa-search"></i></span>-->
    </div>
  </div>
  <!--表格-->
  <div class="set-config-table">
    <p-scrollPanel [style]="{width:'100%',height: '90%'}" styleClass="custombar">
      <p-table [columns]="configTableTitle" [value]="configTableContent" [(selection)]="configSelect">
        <ng-template pTemplate="header" let-columns>
          <tr >
            <th style="width: 3em"  [ngStyle]="this.configTableTitleStyle">
              <p-tableHeaderCheckbox></p-tableHeaderCheckbox>
            </th>
            <th *ngFor="let col of columns"  [ngStyle]="this.configTableTitleStyle">
              {{col.header}}
            </th>
          </tr>
        </ng-template>
        <ng-template pTemplate="body" let-rowData let-columns="columns" let-rowIndex="rowIndex">
          <tr [pSelectableRow]="rowData"  *ngIf="rowIndex%2!=1" [ngStyle]="{'background':'#33353C','color':'#DEDEDE','text-align': 'center','height':'2vw'}">
            <td>
              <p-tableCheckbox [value]="rowData"></p-tableCheckbox>
            </td>
            <td  *ngFor="let col of columns" >
              {{rowData[col.field]}}
            </td>
          </tr>
          <tr [pSelectableRow]="rowData"  *ngIf="rowIndex%2!=0" [ngStyle]="{'background':'#2E3037','color':'#DEDEDE','text-align': 'center','height':'2vw'}">
            <td>
              <p-tableCheckbox [value]="rowData"></p-tableCheckbox>
            </td>
            <td  *ngFor="let col of columns" >
              {{rowData[col.field]}}
            </td>
          </tr>
        </ng-template>
      </p-table>
    </p-scrollPanel>

  </div>
  <!--增加弹窗-->
  <p-dialog header="信息添加" [(visible)]="configAddDialog"  [width]="800">
    <!--Content-->
    <div class="ui-g ui-fluid" [ngStyle]="{'line-height':'3vh'}" >
      <!--<div class="ui-g-6">-->
        <!--<div class="ui-g-4">-->
          <!--<label  for="settingCode">设置编号:</label>-->
        <!--</div>-->
        <!--<div class="ui-g-8">-->
          <!--<input id="settingCode" type="text" pInputText placeholder="请输入设置编号" [(ngModel)]="configAdd.settingCode">-->
        <!--</div>-->
      <!--</div>-->
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="settingName">设置名称：</label>
        </div>
        <div class="ui-g-8">
          <input  id="settingName" type="text" pInputText placeholder="请输入设置名称.." [(ngModel)]="configAdd.settingName">
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >设置类型：</label>
        </div>
        <div class="ui-g-8" style="line-height: 2vh">
          <p-dropdown #addSetType [options]="setTypeOption" scrollHeight="100px" placeholder="请选择设置类型..." (onChange)="setTypeChange($event)"></p-dropdown>
        </div>
      </div>
    </div>
    <p-footer>
      <div class="ui-dialog-buttonpane ui-helper-clearfix">
        <button  class="set-config-dialog-Btn set-config-dialog-Btn-sure" (click)="configAddSureClick()">确认</button>
        <button  class="set-config-dialog-Btn set-config-dialog-Btn-false" (click)="configAddCloseClick()">取消</button>
      </div>
    </p-footer>
  </p-dialog>
  <!--修改弹窗-->
  <p-dialog header="信息修改" [(visible)]="configModifyDialog" [width]="800">
    <!--Content-->
    <div class="ui-g ui-fluid" [ngStyle]="{'line-height':'3vh'}">
      <!--<div class="ui-g-6">-->
        <!--<div class="ui-g-4">-->
          <!--<label for="modifybuildingCode">设置编号：</label>-->
        <!--</div>-->
        <!--<div class="ui-g-8">-->
          <!--<input id="modifybuildingCode" type="text" pInputText placeholder="请输入地块号" [(ngModel)]="configModify.settingCode">-->
        <!--</div>-->
      <!--</div>-->
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label for="modifybuildingName">设置名称：</label>
        </div>
        <div class="ui-g-8">
          <input id="modifybuildingName" type="text" pInputText placeholder="请输入地块号" [(ngModel)]="configModify.settingName">
        </div>
      </div>
      <div class="ui-g-6">
        <div class="ui-g-4">
          <label >设置类型：</label>
        </div>
        <div class="ui-g-8" style="line-height: 2vh">
          <p-dropdown  [options]="setTypeOption" scrollHeight="100px" [placeholder]="configModify.settingType"  [disabled]="true"></p-dropdown>
        </div>
      </div>
    </div>

    <p-footer>
      <div class="ui-dialog-buttonpane ui-helper-clearfix">
        <button class="set-config-dialog-Btn set-config-dialog-Btn-sure" (click)="configModifySureClick()">确认</button>
        <button  class="set-config-dialog-Btn set-config-dialog-Btn-false"  (click)="configModifyCloseClick()">取消</button>
      </div>
    </p-footer>
  </p-dialog>
  <rbi-paging [option]="option" (pageClick)="nowpageEventHandle($event)"></rbi-paging>
  <rbi-loading [hidden]="loadHidden" style="position: absolute;left: 45vw;top:40vh;z-index: 99999"></rbi-loading>

</div>
